package demo2;

import org.w3c.dom.ls.LSOutput;

/**
 * @Author liangzai
 * @Description:
 */
public class Test {
    public static void main(String[] args) {
        Point p1 = new Point(3,8);
        Point p2 = new Point(6,2);
        PointDemo pointDemo = new PointDemo();
        double distance = pointDemo.distance(p1,p2);
        System.out.printf("%.2f",distance);
    }

    public static void main1(String[] args) {
        Rectangle rectangle1 = new Rectangle(40,4);
        Rectangle rectangle2 = new Rectangle(35.9,3.5);

        System.out.println("rectangle1:"+"Area:"+rectangle1.getArea()+"  Perimeter:"+rectangle1.getPerimeter());
        System.out.printf("rectangle2:"+"Area:"+rectangle2.getArea()+"  Perimeter:"+rectangle2.getPerimeter());
    }
}
